unit uMenu;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes,
  System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls,
  FMX.Header, FMX.Layouts, FMX.ListBox, FMX.Ani, uSplash, FMX.Media,
  System.IOUtils, DateUtils, FMX.Advertising;

type
  TfmMenu = class(TForm)
    lbMenu: TListBox;
    ListBoxItem1: TListBoxItem;
    ListBoxItem2: TListBoxItem;
    ListBoxItem3: TListBoxItem;
    ListBoxItem4: TListBoxItem;
    ListBoxItem5: TListBoxItem;
    ListBoxItem6: TListBoxItem;
    ListBoxGroupHeader1: TListBoxGroupHeader;
    ListBoxGroupHeader2: TListBoxGroupHeader;
    ListBoxItem7: TListBoxItem;
    ListBoxItem8: TListBoxItem;
    ListBoxGroupHeader3: TListBoxGroupHeader;
    ListBoxItem9: TListBoxItem;
    ListBoxItem10: TListBoxItem;
    ListBoxItem11: TListBoxItem;
    ListBoxItem12: TListBoxItem;
    ListBoxGroupHeader4: TListBoxGroupHeader;
    ListBoxItem13: TListBoxItem;
    ListBoxItem14: TListBoxItem;
    ListBoxItem15: TListBoxItem;
    Layout1: TLayout;
    Switch1: TSwitch;
    Layout2: TLayout;
    Switch2: TSwitch;
    StyleBook1: TStyleBook;
    LayCli: TLayout;
    LayBot: TLayout;
    BannerAd1: TBannerAd;
    procedure ListBoxItem9Click(Sender: TObject);
    procedure ListBoxItem10Click(Sender: TObject);
    procedure ListBoxItem11Click(Sender: TObject);
    procedure ListBoxItem12Click(Sender: TObject);
    procedure Switch2Switch(Sender: TObject);
    procedure ListBoxItem1Click(Sender: TObject);
    procedure ListBoxItem14Click(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure ListBoxItem2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fmMenu: TfmMenu;

implementation

uses uPlayer, uActo, uMapa, uGlobal, uJueves;

{$R *.fmx}

procedure TfmMenu.ListBoxItem9Click(Sender: TObject);
begin
  fmSplash.MediaPlayer1.Stop;
  fmPlayer := TfmPlayer.Create(nil);
  fmPlayer.Show;
  fmPlayer.cmbCamaras.ItemIndex := 1;
end;

procedure TfmMenu.Switch2Switch(Sender: TObject);
begin
  if Switch2.IsChecked = false then
    fmSplash.MediaPlayer1.Stop
  Else
  Begin
    fmSplash.MediaPlayer1.FileName := TPath.GetDocumentsPath + PathDelim +
      'idella.mp3';
    fmSplash.MediaPlayer1.Play;
  End;
end;

procedure TfmMenu.FormActivate(Sender: TObject);
begin
  BannerAd1.AdUnitID := 'ca-app-pub-5981104271090278/7844973747'
end;

procedure TfmMenu.ListBoxItem10Click(Sender: TObject);
begin
  fmSplash.MediaPlayer1.Stop;
  fmPlayer := TfmPlayer.Create(nil);
  fmPlayer.Show;
  fmPlayer.cmbCamaras.ItemIndex := 7;
end;

procedure TfmMenu.ListBoxItem11Click(Sender: TObject);
begin
  fmSplash.MediaPlayer1.Stop;
  fmPlayer := TfmPlayer.Create(nil);
  fmPlayer.Show;
  fmPlayer.cmbCamaras.ItemIndex := 5;
end;

procedure TfmMenu.ListBoxItem12Click(Sender: TObject);
begin
  fmSplash.MediaPlayer1.Stop;
  fmPlayer := TfmPlayer.Create(nil);
  fmPlayer.Show;
end;

procedure TfmMenu.ListBoxItem14Click(Sender: TObject);
begin
  fmMapa := TfmMapa.Create(nil);
  fmMapa.Show;
end;

procedure TfmMenu.ListBoxItem1Click(Sender: TObject);
begin
  MostrarActo('Pregon');
end;

procedure TfmMenu.ListBoxItem2Click(Sender: TObject);
begin
  fmJueves := TfmJueves.Create(nil);
  fmJueves.Show;
end;

end.
